﻿using System.ServiceProcess;
using DataProcessor.Processor;

namespace DataProcessor
{
    static class Program
    {
        /// <summary>
        /// 应用程序的主入口点。
        /// </summary>
        static void Main()
        {
            bool IsDebug = false;
            if (!IsDebug)
            {
                var servicesToRun = new ServiceBase[]
                {
                    new ServiceDataProcessor()
                };


                ServiceBase.Run(servicesToRun);
            }
            else
            {
                string str =
                    "##0446QN=20190514000105000;ST=31;CN=2011;PW=123456;MN=108302858226000310100015;Flag=5;CP=&&DataTime=20190514000105;a01011-Rtd=3.18,a01011-Flag=N;a34013-Rtd=7.70,a34013-ZsRtd=15.23,a34013-Flag=N;a21026-Rtd=28.84,a21026-ZsRtd=57.03,a21026-Flag=N;a21002-Rtd=172.98,a21002-ZsRtd=342.10,a21002-Flag=N;a00000-Rtd=10.52,a00000-Flag=N;a19001-Rtd=15.94,a19001-Flag=N;a01012-Rtd=140.48,a01012-Flag=N;a01014-Rtd=18.65,a01014-Flag=N;a01013-Rtd=0.26,a01013-Flag=N&&21C0\n";
                DataInstructionProcessor.Process2011(str);
            }
        }
    }
}
